<?php
	$title = 'title_'.$this->lang;
?>
<div>
	<div class="box-h1">
		<h1><i>
			<?=Kohana::lang('site.viewcart')?> -> 
			<?=Kohana::lang('site.login')?> -> 
			<?=Kohana::lang('site.shipping')?> -> 
			<em><?=Kohana::lang('site.invoice')?></em> -> 
			<?=Kohana::lang('site.payment')?></i>
			<?=Kohana::lang('title.yourcart')?>
		</h1>
		<div class="box1 sform">
		<?php if(count($products)>0) { ?>
			<?php include(Kohana::find_file('views', 'order/product_list')); ?>
			<br/><h3><?=Kohana::lang('site.shipping_information')?></h3>
			<ul>
			<?php if($order->customer_type=='bookstore' or $order->customer_type=='school') { ?>
				<li>
					<span class="label"><?=Kohana::lang('site.'.$order->customer_type.'_name')?></span>
					<span class="required"></span>
					<span><?=$order->customer_name?></span>
				</li>
				<li>
					<span class="label"><?=Kohana::lang('site.po_number')?></span>
					<span class="required"></span>
					<span><?=$order->customer_po_number?></span>
				</li>
			<?php } ?>
			<?php if($order->customer_type=='bookstore') { ?>
				<li>
					<span class="label"><?=Kohana::lang('site.resale_permit_no')?></span>
					<span class="required"></span>
					<span><?=$order->customer_resale_permit_no?></span>
				</li>
			<?php } ?>
			<li>
				<span class="label"><?=Kohana::lang('site.first_name')?></span>
				<span class="required"></span>
				<span><?=$order->firstname?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.last_name')?></span>
				<span class="required"></span>
				<span><?=$order->lastname?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.email')?></span>
				<span class="required"></span>
				<span><?=$order->email?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.phone')?></span>
				<span class="required"></span>
				<span><?=$order->telephone?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.fax')?></span>
				<span class="required"></span>
				<span><?=$order->fax?></span>
			</li></ul>
			<br/><h3><?=Kohana::lang('site.shipping_address')?></h3>
			<ul><li>
				<span class="label"><?=Kohana::lang('site.address_line')?> 1</span>
				<span class="required"></span>
				<span><?=$order->shipping_address_1?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.address_line')?> 2</span>
				<span class="required"></span>
				<span><?=$order->shipping_address_2?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.city')?></span>
				<span class="required"></span>
				<span><?=$order->shipping_city?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.state_province')?></span>
				<span class="required"></span>
				<span><?=$shipping_zone->name?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.country')?></span>
				<span class="required"></span>
				<span><?=$shipping_country->name?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.postal_code')?></span>
				<span class="required"></span>
				<span><?=$order->shipping_zip_code?></span>
			</li></ul>
			<br/><h3><?=Kohana::lang('site.billing_address')?></h3>
			<ul><li>
				<span class="label"><?=Kohana::lang('site.address_line')?> 1</span>
				<span class="required"></span>
				<span><?=$order->billing_address_1?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.address_line')?> 2</span>
				<span class="required"></span>
				<span><?=$order->billing_address_2?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.city')?></span>
				<span class="required"></span>
				<span><?=$order->billing_city?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.state_province')?></span>
				<span class="required"></span>
				<span><?=$billing_zone->name?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.country')?></span>
				<span class="required"></span>
				<span><?=$billing_country->name?></span>
			</li><li>
				<span class="label"><?=Kohana::lang('site.postal_code')?></span>
				<span class="required"></span>
				<span><?=$order->billing_zip_code?></span>
			</li></ul>
			<br/><h3><?=Kohana::lang('site.express_information')?></h3>
			<ul><li>
				<span class="label"><?=Kohana::lang('site.service_type')?></span>
				<span class="required"></span>
				<span><?php $info = Config::item('ups.service_type'); echo $info[$order->ups_service_type]; ?></span>
			</li></ul>
			<br/><h3><?=Kohana::lang('site.type_of_payment')?></h3>
			<ul><li>
				<span class="label"><?=Kohana::lang('site.type_of_payment')?></span>
				<span class="required"></span>
				<span><?=($order->payment_type == 'Paypal') ? $order->payment_type : Kohana::lang('site.check')?></span>
			</li><?php if($order->customer_type!='normal' and $userinfo->flag_prove==0) { ?><li>
				<span class="label"></span>
				<span class="required"></span>
				<span>For the first time customer, please download and fill out this application form. <br/>Fax the completed form to Nan Hai Co.at (650) 259-2108. Thanks for your cooperation.<br/>
				<br/><a href="<?=url::base()?>upload/PO_application_form.pdf">PO Application Form</a></span>
			</li><?php } ?><li>
				<span class="label"></span>
				<span class="required"></span>
				<span></span>
			</li></ul>
			<br/>
			<button onclick="window.location='/order/flagconfirm/<?=$order->id?>'"><?=Kohana::lang('site.place_order')?></button>
			<button onclick="window.location='/order/modify/<?=$order->id?>.html'"><?=Kohana::lang('site.modify_order')?></button>
		<?php } else { ?>
			<?=Kohana::lang('site.cart_is_empty')?>
		<?php } ?>
			<div style="clear:both;"></div>
		</div>
	</div>
</div>